<html>
  <head>
    <title></title>
    <style></style>
    <script type="text/tiscript">
    
      VM.unhandledExceptionHandler = function(err) {
        view.msgbox(#error, err.toString() );
        return true; // "consume" the exception
      }
    
      $(button).onClick = function() {
        nonexistent = true; // will throw "undefined" error
      }
    
    </script>
  </head>
<body>
   <button>Generate error</button> 
</body>
</html>
